﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace WcfServiceDemo
{
    //[ServiceContract(CallbackContract = typeof(IMyContractCallBack))]
    [ServiceContract(CallbackContract = typeof(IClientCallback))]
    public interface IService1
    {
        //[OperationContract(IsOneWay = true)]
        //void NormalFunction(string str);

        [OperationContract]
        List<string> GetDataChat();

        [OperationContract]
        void AddText(string str);

        [OperationContract]
        string RegisterClient();

        [OperationContract]
        void RemoveClient(string keyClientProxy);
    }

    //public interface IMyContractCallBack
    //{
    //    [OperationContract(IsOneWay = true)]
    //    void CallBackFunction(string str);
    //}

    public interface IClientCallback
    {
        [OperationContract]
        void RefreshData();
    } 
}
